<?php 
/**
 * Content - SimpleProductSnapshot
 *
 * @version 1.4
 * @package Joomla
 * @subpackage plugins
 * 
 * @author Bruno Pourtier
 * @website http://forge.joomla.org/gf/project/simplesnapshot/
 * @email bruno.pourtier@gmail.com
 * @copyright (C) 2008-2010 Bruno Pourtier
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 *
 * http://www.joomla.org
 *
 * Seber Cart is Free Software.
 * Seber Cart comes with absolute no warranty.
 * http://sebercart.com/
 */
 
if( !defined( '_JEXEC' ) ) die( 'Direct Access to ' . basename(__FILE__) . ' is not allowed.' );

ob_start();
?>
<div class="SeberTip sps_product">
	<?php if(!empty($params['show_product_name'])): ?>
		<span class="product_name">
			<?php echo $params['product_name']; ?>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_product_image'])): ?>
		<span class="product_image">
			<a title="<?php echo $params['product_name']; ?>" href="<?php echo $params['product_link']; ?>">
				<img src="<?php echo $params['product_thumb_image']; ?>" alt="<?php echo $params['product_name']; ?>" />
			</a>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_product_desc'])): ?>
		<span class="product_s_desc">
			<?php echo substr($params['product_s_desc'], 0, 100); ?>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_product_price'])): ?>
		<span class="product_price">
			<?php echo outputPriceFormatted($params['product_id']); ?>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_product_stock'])): ?>
		<span class="product_stock">
			<?php echo getStockLevelEnglish($params['product_stock'], true, true); ?>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_link_addtocart'])): ?>
		<span class="product_link_addtocart">
			<a href="<?php echo $params['addtocart_link']; ?>" title="<?php echo JText::_('SPS_MYCART'); ?>">
				<img src="<?php echo Juri::root(); ?>components/com_sebercart/images/add2cart.png" alt="<?php echo JText::_('SPS_ADDTOCART'); ?>" /><br />
			</a>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_link_mycart'])): ?>
		<span class="product_link_mycart">
			<a href="<?php echo $params['mycart_link']; ?>" title="<?php echo JText::_('SPS_MYCART'); ?>">
				<?php echo JText::_('SPS_MYCART'); ?>
			</a>
		</span>
	<?php endif; ?>
	<?php if(!empty($params['show_link_readmore'])): ?>
		<span class="product_link_readmore">
			<a href="<?php echo $params['product_link']; ?>" title="<?php echo JText::_('SPS_READMORE'); ?>">
				<?php echo JText::_('SPS_READMORE'); ?>
			</a>
		</span>
	<?php endif; ?>
</div>
<?php 
$content = ob_get_contents();
ob_end_clean();
return $content;
?>